package logManage

import (
	"main/src/utils"
	"time"
)

var LogRoute = utils.Routes{
	BaseUrl: "log",
	Routes: []*utils.Route{
		{
			Path:         "/delete",
			Method:       "POST",
			View:         DeleteLog,
			Body:         DeleteLogDto{Id: 0},
			ResponseJson: nil,
		},
		{
			Path:   "/create",
			Method: "POST",
			View:   CreateLog,
			Body: CreateLogDto{
				Referrer:  "",
				IP:        "",
				UserAgent: "",
				URL:       "",
			},
			ResponseJson: LogInfoResponseDto{
				Id:        0,
				Referrer:  "",
				IP:        "",
				UserAgent: "",
				URL:       "",
				CreatedAt: time.Time{},
				UpdatedAt: time.Time{},
			},
		},
		{
			Path:   "/update",
			Method: "POST",
			View:   UpdateLog,
			Body: UpdateLogDto{
				Id:        0,
				Referrer:  "",
				IP:        "",
				UserAgent: "",
				URL:       "",
			},
			ResponseJson: LogInfoResponseDto{
				Id:        0,
				Referrer:  "",
				IP:        "",
				UserAgent: "",
				URL:       "",
				CreatedAt: time.Time{},
				UpdatedAt: time.Time{},
			},
		},
		{
			Path:   "/get",
			Method: "POST",
			View:   GetLog,
			Body: GetLogDto{
				GetDataLimitDto: utils.GetDataLimitDto{
					PageNum:  0,
					PageSize: 0,
				},
				IP: "",
			},
			ResponseJson: utils.GetDataLimitResponseDto{
				Total:        0,
				Page:         0,
				NextPage:     0,
				PreviousPage: 0,
				Data: []LogInfoResponseDto{
					{
						Id:        0,
						Referrer:  "",
						IP:        "",
						UserAgent: "",
						URL:       "",
						CreatedAt: time.Time{},
						UpdatedAt: time.Time{},
					},
				},
			},
		},
	},
}
